package ooday05;

/** 枚举的演示 */
public class EnumDemo {
    public static void main(String[] args) {
        Season s = Season.SPRING; //获取SPRING对象
        switch (s){
            case SPRING:
                System.out.println("天气"+s.getSeasonDesc()+","+s.getSeasonName()+"该去放风筝");
                break;
            case SUMMER:
                System.out.println("天气"+s.getSeasonDesc()+","+s.getSeasonName()+"该去玩漂流");
                break;
            case AUTUMN:
                System.out.println("天气"+s.getSeasonDesc()+","+s.getSeasonName()+"该去摘果子");
                break;
            case WINTER:
                System.out.println("天气"+s.getSeasonDesc()+","+s.getSeasonName()+"该去玩滑雪");
                break;
        }

        System.out.println("-------");
        Season[] seasons = Season.values();
        for (Season season:seasons) {
            System.out.println(season);
            System.out.println(season.getSeasonName()+","+season.getSeasonDesc());
        }
    }
}
